package Thread;

public class ThreadDemo7 {

    public static void main(String[] args) throws InterruptedException {
        Thread t = new Thread(()->{
            for (int i = 0; i < 100; i++) {
                try {
                    Thread.sleep(10);
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
            }
        });
        System.out.println("此时线程的状态:"+t.getState());
        t.start();
        for (int i = 0; i < 15; i++) {
            System.out.println("此时线程的状态:"+t.getState());
        }
        t.join();
        System.out.println("此时线程的状态:"+t.getState());

    }

}
